import PropTypes from 'prop-types'
import TopItem from './TopItem'

function TopList({items, type}) {
  console.log(items)
  return (
    <div className="con-hour con-72hr" style={{ left: 8 }}>
      {
        items.map(
          (item, index) => <TopItem
            key={item.id}
            index={index}
            item={item}
          />
        )
      }
    </div>
  )
}
TopList.propTypes = {
  items: PropTypes.arrayOf(PropTypes.object),
  type: PropTypes.oneOf(['24', '72', '168'])
}

export default TopList
